import java.util.Scanner;

public class Training03 {
    public static void main(String[] args) {
        int[] arr=getUserInput();
        printIntArray(arr);
        showOdd(arr);
        showEven(arr);
    }
    public static void showOdd(int[]arr) {
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]%2 == 0){
                continue;
            }
            System.out.println(arr[i]+"");
        }
        System.out.println("\n");
    }
    public static void showEven(int[]arr){
        for (int i=0;i< arr.length;i++){
            if (arr[i]%2==1){
                continue;
            }
            System.out.println(arr[i]+"");
        }
        //System.out.println("\n");
    }
    public static int[] getUserInput(){
        System.out.println("请随机输入五个整数");
        Scanner sc =new Scanner(System.in);
        int[] arr=new int[5];
        for (int i=0;i< arr.length;i++){
            System.out.println("请输入数字:");
            arr[i] = sc.nextInt();
        }
        return arr;
    }
    public static void printIntArray(int[]arr){
        System.out.println("你输入的数字是:");
        for (int i=0;i<arr.length;i++);
    }
}
